﻿@model MvcGMaps.Models.Marker
@using MvcGMaps.Utils

<form class="form-horizontal" id="editForm" role="form">
    <fieldset>
        <legend>Событие</legend>
        @Html.HiddenFor(m => m.MarkerID)
        @Html.HiddenFor(m => m.Latitude)
        @Html.HiddenFor(m => m.Longitude)
        <div class="form-group input-group-sm">
            @Html.LabelFor(m => m.TypeID, "Тип: ", new { @class = "control-label" })
            @Html.DropDownList("TypeID", (SelectList)ViewData["TypeID"], new { @class = "form-control input-sm" })
        </div>
        @Html.ValidationMessageFor(m => m.TypeID)
        
        <div class="form-group input-group-sm">
            @Html.LabelFor(m => m.StatusID, "Статус: ", new { @class = "control-label" })
            @Html.DropDownList("StatusID", (SelectList)ViewData["StatusID"], new { @class = "form-control input-sm" })
        </div>
        @Html.ValidationMessageFor(m => m.StatusID)
        @Html.InputDate("Дата:", "datepicker", "AddedDate", Model.AddedDate.ToShortDateString(), false)
        @Html.ValidationMessageFor(m => m.AddedDate)
        <div class="form-group">
            @Html.TextAreaFor(m => m.Commentary, new { @class = "form-control", @rows = "3", @placeholder = "Комментарий" })
        </div>
        @*if (Request.IsAuthenticated)
        {
            <br />
            <button type="button" class="btn btn-primary btn-block" onclick="updateMarker()">Сохранить</button>
        }*@
        <div class="btn-group-sm">
            <button type="button" class="btn btn-primary btn-block" onclick="updateMarker()">Сохранить</button>
        </div>
</fieldset>
</form>
<script src="~/Scripts/app/editview.js" type="text/javascript"></script>